package com.ruoyi.common.entity;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

import java.io.Serializable;

/**
 * 用户登录对象
 *
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LoginBody implements Serializable {
    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    private String username;

    /**
     * 用户密码
     */
    @NotBlank(message = "密码不能为空")
    private String password;

    /**
     * 验证码
     */
    @NotBlank(message = "验证码不能为空")
    @Length(min = 5,max = 5,message = "验证码长度必须为5")
    private String code;

    /**
     * 唯一标识
     */
    @NotBlank(message = "uuid不能为空")
    @Length(min = 32,max = 32,message = "uuid长度必须为32")
    private String uuid;

}
